package com.punch.user.mapper;

import com.punch.common.vo.user.student.StudentPageForAppVO;
import com.punch.common.vo.user.student.StudentPageVO;
import com.punch.db.mapper.SuperMapper;
import com.punch.user.model.SysStudent;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 学生信息表
 *
 * @author tanchangguo
 * @email 17607195327@163.com
 * @date 2020-07-21 19:10:02
 */
@Mapper
public interface SysStudentMapper extends SuperMapper<SysStudent> {
    /**
     * 查询总数
     *
     * @param params
     * @return
     */
    int queryCount(Map<String, Object> params);

    /**
     * 条件分页查询学生列表信息
     *
     * @param params
     * @return
     */
    List<StudentPageVO> queryList(Map<String, Object> params);

    /**
     * 条件分页查询学生信息列表
     *
     * @param params
     * @return
     */
    List<StudentPageForAppVO> queryListForApp(Map<String, Object> params);

    List<StudentPageVO> selectBySchoolAndName(@Param("schoolId") Long schoolId, @Param("studentName") String studentName);

    /**
     * 查找该学校的年级下的班级
     *
     * @param schoolId 学校id
     * @param grade    年级
     * @return list<string>
     */
    List<String> selectGradeClass(@Param("schoolId") Long schoolId, @Param("grade") Integer grade);
}
